﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Admin_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    StatisticsBusiness sb = new StatisticsBusiness();
    UserBusiness ub = new UserBusiness();

    public int getSumPassengers()
    {
        return ub.countUser(2);
    }

    public int getView()
    {
        int result = 0;
        DataTable dt = sb.GetAllStatistics();
        if (dt!=null)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr = dt.Rows[i];
                result += int.Parse(dr["statisticsVisited"].ToString());
                dr.Delete();
            }
        }
        return result;
    }
}